export default {
    namespace: 'interviewREC',

    state: {
        activedInterviewPageList: [] // 用于保存已开启面试记录页面对应的arrangeId
    },

    reducers: {
        addActivedInterviewPage(state, { arrangeId }) {
            const tempList = state.activedInterviewPageList;
            if (!tempList.includes(arrangeId)) {
                tempList.push(arrangeId);
            }
            return { activedInterviewPageList: tempList };
        },
        removeInterviewPage(state, { arrangeId }) {
            const tempList = state.activedInterviewPageList;
            const index = tempList.indexOf(arrangeId);
            if (index >= 0) {
                tempList.splice(index, 1);
            }
            return { activedInterviewPageList: tempList };
        }
    }
};
